<template>
  <div @click="toGameDetail(item.game_id, item.down_link, item.classify)" class="item">
    <img class="item__icon" :src="item.icon">
    <p class="item__name">{{item.game_name}}</p>
    <p class="item__tags" v-if="item.type">{{item.type[0]}}</p>
  </div>
</template>

<script>
export default {
  name: 'rowItem',
  props: {
    item: {
      type: Object
    }
  }
}
</script>

<style scoped lang="scss">
.item {
  display: inline-block;
  margin-right: 0.2rem;
  text-align: center;
  vertical-align: top;
  width: 0.68rem;

  &:last-child {
    margin-right: 0.15rem;
  }

  &__icon {
    border-radius: 0.1rem;
    height: 0.68rem;
    margin-bottom: 0.06rem;
    width: 0.68rem;
  }

  &__name {
    color: #333;
    font-size: 0.13rem;
    font-weight: bold;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  &__tags {
    color: #666;
    font-size: 0.1rem;
  }
}
</style>
